using System.IO;
using Microsoft.SharePoint.Utilities;

namespace Aks.Deployment.SharePoint
{
	/// <summary>
	/// Privides a list of standard paths.
	/// </summary>
	public static class SetupPath
	{
		#region | Root Directories |

		/// <summary>Path to the root directory (aka 12 hive).</summary>
		public static readonly string Root;

		/// <summary>Path to the standard admin ISAPI directory.</summary>
		public static readonly string AdminIsapi;

		/// <summary>Path to the standard bin directory.</summary>
		public static readonly string Bin;

		/// <summary>Path to the standard config directory.</summary>
		public static readonly string Config;

		/// <summary>Path to the standard ISAPI directory.</summary>
		public static readonly string Isapi;

		/// <summary>Path to the standard logs directory.</summary>
		public static readonly string Logs;

		#endregion


		#region | Template Directories |

		/// <summary>Path to the standard template directory.</summary>
		public static readonly string Template;

		/// <summary>Path to the standard admin directory.</summary>
		public static readonly string Admin;
		
		/// <summary>Path to the standard control templates directory.</summary>
		public static readonly string ControlTemplates;
		
		/// <summary>Path to the standard document templates directory.</summary>
		public static readonly string DocumentTemplates;

		/// <summary>Path to the standard features directory.</summary>
		public static readonly string Features;
		
		/// <summary>Path to the standard global directory.</summary>
		public static readonly string Global;
		
		/// <summary>Path to the standard images directory.</summary>
		public static readonly string Images;
		
		/// <summary>Path to the standard layouts directory.</summary>
		public static readonly string Layouts;
		
		/// <summary>Path to the standard pages directory.</summary>
		public static readonly string Pages;
		
		/// <summary>Path to the standard site templates directory.</summary>
		public static readonly string SiteTemplates;
		
		/// <summary>Path to the standard SQL directory.</summary>
		public static readonly string Sql;
		
		/// <summary>Path to the standard themes directory.</summary>
		public static readonly string Themes;
		
		/// <summary>Path to the standard XML directory.</summary>
		public static readonly string Xml;

		#endregion


		/// <summary>
		/// Initializes the <see cref="SetupPath"/> class.
		/// </summary>
		static SetupPath()
		{
			// root
			Root = SPUtility.GetGenericSetupPath("");

			// base
			AdminIsapi = Path.Combine(Root, "admisapi");
			Bin = Path.Combine(Root, "bin");
			Config = Path.Combine(Root, "config");
			Isapi = Path.Combine(Root, "isapi");
			Logs = Path.Combine(Root, "logs");
			
			// template
			Template = Path.Combine(Root, "template");
			Admin = Path.Combine(Template, "admin");
			ControlTemplates = Path.Combine(Template, "controltemplates");
			DocumentTemplates = Path.Combine(Template, "documenttemplates");
			Features = Path.Combine(Template, "features");
			Global = Path.Combine(Template, "global");
			Images = Path.Combine(Template, "images");
			Layouts = Path.Combine(Template, "layouts");
			Pages = Path.Combine(Template, "pages");
			SiteTemplates = Path.Combine(Template, "sitetemplates");
			Sql = Path.Combine(Template, "sql");
			Themes = Path.Combine(Template, "themes");
			Xml = Path.Combine(Template, "xml");
		}
	}
}